/*
     File: AVCamViewController.h
 Abstract: View controller for camera interface.
  Version: 3.1
 

 
 Copyright (C) 2014 Apple Inc. All Rights Reserved.
 
 */

#import <UIKit/UIKit.h>

typedef enum {
    VideoRecordStateStarted        = 0, //正在直播
    VideoRecordStatePaused         = 1, //直播暂停
    VideoRecordStateStoped         = 2, //停止直播
} VideoRecordState;

typedef enum : NSUInteger {
    ScreenTypeVertical          = 0,//竖屏
    ScreenTypeCross             = 1,//横屏
} ScreenType;

typedef enum {
    VideoSize640x480        = 0, //640*480大小
    VideoSize1280x720       = 1, //1280*720大小
} VideoSessionSizeType;

typedef enum {
    VideoRecodeHardEncode   = 0,//硬编码
    VideoRecodeSoftEncode   = 1,//软编码
} VideoRecordEncodeType;

typedef enum {
    VideoQualityLow         = 0,//流畅
    VideoQualityNormal      = 1,//普清
    VideoQualityHigh        = 2,//标清
    VideoQualityVeryHigh    = 3,//高清
} VideoQualityType;

@protocol CheckTokenIdDelegte <NSObject>

- (void)checkTokenIdResult:(NSString*)code withActivityId:(NSInteger)activityId withUserId:(NSInteger)userId;
- (void)liveRecordStateChanged:(VideoRecordState)state;
- (void)recordControllerExited:(NSInteger)activeId;

@end

typedef void (^LoginUserInfoBlock)(NSString* code,NSInteger activityId,NSInteger userId,NSString* tokenId);

@class AVCamAppDelegate ;

@interface AVCamViewController : UIViewController

+(void)getLoginUserInfo:(NSString*)userName withPassword:(NSString*)pwd withBlock:(LoginUserInfoBlock)block;

- (instancetype)initWithAid:(NSInteger)aid withUserId:(NSInteger)did withType:(VideoRecordEncodeType)encodeType  withQuality:(VideoQualityType) qualityType withSize:(VideoSessionSizeType)type withToken:(NSString *)tokenId withScreenType:(ScreenType)screenType;

@property (nonatomic, assign) id<CheckTokenIdDelegte> delegate;


@end
